// drawwnd.cpp : implementation file
//

#include "stdafx.h"
#include "Saver.h"
#include "drawwnd.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif


//*****************************************************************************
//-----------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
// CDrawWnd
//-----------------------------------------------------------------------------
CDrawWnd::CDrawWnd(BOOL bAutoDelete /* = TRUE */)
{
	m_bAutoDelete = bAutoDelete;
}
//-----------------------------------------------------------------------------
CDrawWnd::~CDrawWnd()
{
}
//-----------------------------------------------------------------------------
BOOL CDrawWnd::Create(DWORD dwExStyle, LPCTSTR lpszWindowName, DWORD dwStyle,
					  const RECT &rect, CWnd *pWndParent, UINT nID /* = 0 */)
{
	return this->CreateEx(dwExStyle,
						  ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
												NULL,
							static_cast<HBRUSH>(::GetStockObject(BLACK_BRUSH)),
										::AfxGetApp()->LoadIcon(IDR_MAINFRAME)),
						  lpszWindowName, dwStyle,
						  rect, pWndParent, nID);
}
//-----------------------------------------------------------------------------
void CDrawWnd::PostNcDestroy()
{
	if (m_bAutoDelete)
	{
		delete this;
	}
}
//-----------------------------------------------------------------------------
BEGIN_MESSAGE_MAP(CDrawWnd, CWnd)
	//{{AFX_MSG_MAP(CDrawWnd)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
//-----------------------------------------------------------------------------
void CDrawWnd::OnPaint()
{
	CPaintDC dc(this);

	// Add your drawing code here.
	CRect rc ;
	GetClientRect(rc);
	dc.TextOut(rc.right -20,rc.bottom - 20,_T("testse"));
}
//-----------------------------------------------------------------------------
//*****************************************************************************
